package ingresso

class Usuario {

	String email;
	String senha;
	String nome;
	String cpf;	
	String endereco;
	String fone;
	Date dataNascimento;
	String tipoUsuario
	
	String toString() { "$email" }

	static constraints = {

		email blank:false, nullable:false, email:true, unique: true
		senha size:3..15, nullable:false, blank:false, password:true
		nome size:2..32, nullable:false, blank:false
		cpf cpf: true, size:11..14, nullable:false, blank:false, unique:false
		dataNascimento blank:false, nullable:false		
		endereco size:3..255, nullable:false, blank:false
		fone minSize: 8, nullable:false, blank:false
		tipoUsuario inList:["Admin", "Cliente"]
	}
}
